﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace BtoBSWT315.Company
{
    public partial  class JobView : System.Web.UI.Page
    {
        public int CompanyID;
        private void Page_Load(object sender, System.EventArgs e)
        {
            // 在此处放置用户代码以初始化页面
            if (!IsPostBack)
            {
                QYDataBind();
            }
        }


        private void QYDataBind()
        {
            //int gsid = Convert.ToInt32(Request.QueryString["gsid"]);

            Admin.Admin_ClassDb classdb = new Admin.Admin_ClassDb();

            //string qymlSQL = "select qymc from qyml where id=" + gsid;

            //qymc.Text = classdb.ExcuteScale(qymlSQL);			//企业名称
            //HyperLink1.NavigateUrl = "Default.aspx?ID=" + gsid;
            //HyperLink2.NavigateUrl = "Default.aspx?ID=" + gsid + "#02";
            //HyperLink3.NavigateUrl = "Default.aspx?ID=" + gsid + "#01";
            //HyperLink4.NavigateUrl = "Default.aspx?ID=" + gsid + "#03";
            //HyperLink6.NavigateUrl = "Jop.aspx?ID=" + gsid;
            //HyperLink7.NavigateUrl = "Connection.aspx?ID=" + gsid;



            int ID = Convert.ToInt32(Request.QueryString["ID"]);
            CompanyID = ID;

            int jobid = Convert.ToInt32(Request.QueryString["jobid"]);

            string sql = "select * from job where ID=" + jobid;
            DataTable dataTable = new DataTable();
            dataTable = classdb.GetTables(sql);
            foreach (DataRow row in dataTable.Rows)
            {
                //Literal1.Text = row["qymc"].ToString();
                ShowName.Text = row["showname"].ToString();				//职位名称
                Company.Text = row["company"].ToString();				//企业名称
                Address.Text = row["address"].ToString();			//企业地址
                Phone.Text = row["phone"].ToString();				//企业电话
                //Fax.Text = row["fax"].ToString();				   //传真
                LinkMan.Text = row["linkman"].ToString();				//联系人
                //mobile.Text = row["mobile"].ToString();			//手机
                Mail.Text = row["mail"].ToString();				//邮箱
                DateandTime.Text=row["dateandtime"].ToString();
                Web.Text = row["web"].ToString();
                Web.NavigateUrl = row["web"].ToString();
                Country.Text = row["country"].ToString();       
                Type.Text = row["type"].ToString();
                zrs.Text = row["zrs"].ToString();
                Period.Text = row["Period"].ToString();
            }
            dataTable.Clear();
            dataTable.Dispose();

        }



        #region Web 窗体设计器生成的代码
        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
            //
            InitializeComponent();
            base.OnInit(e);
        }

        /// <summary>
        /// 设计器支持所需的方法 - 不要使用代码编辑器修改
        /// 此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            this.Load += new System.EventHandler(this.Page_Load);

        }
        #endregion
    }
}